package com.mob.tools.log;

import android.util.Log;
import com.mob.tools.MobLog;

public class MobUncaughtExceptionHandler
  implements Thread.UncaughtExceptionHandler
{
  private static boolean disable;
  private static boolean isDebug = false;
  private static Thread.UncaughtExceptionHandler oriHandler;

  public static void closeLog()
  {
    isDebug = false;
  }

  public static void disable()
  {
    disable = true;
  }

  public static void openLog()
  {
    isDebug = true;
  }

  public static void register()
  {
    if (!disable)
    {
      oriHandler = Thread.getDefaultUncaughtExceptionHandler();
      Thread.setDefaultUncaughtExceptionHandler(new MobUncaughtExceptionHandler());
    }
  }

  public void uncaughtException(Thread paramThread, Throwable paramThrowable)
  {
    if (isDebug)
      Log.wtf("MobUncaughtExceptionHandler", paramThrowable);
    MobLog.getInstance().crash(paramThrowable);
    if (oriHandler != null)
      oriHandler.uncaughtException(paramThread, paramThrowable);
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.mob.tools.log.MobUncaughtExceptionHandler
 * JD-Core Version:    0.6.2
 */